package com.ruoyi.lhky.controller;

import com.ruoyi.lhky.pojo.V3;
import com.ruoyi.lhky.service.V3Service;
import com.ruoyi.lhky.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v3")
@Tag(name = "V3管理", description = "V2表的相关操作")
public class V3Controller {

    @Autowired
    private V3Service v3Service;

    @PostMapping("/add")
    @Operation(summary = "新增V2记录", description = "新增V2记录")
    @ApiResponses({
            @ApiResponse(responseCode = "200", description = "新增成功"),
            @ApiResponse(responseCode = "400", description = "请求参数错误"),
            @ApiResponse(responseCode = "500", description = "服务器内部错误")
    })
    public R addV2(@RequestBody V3 v3) {
        return v3Service.addV3(v3);
    }
}
